<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>watch</title>
</head>

<body>
    <div id="app">
        <div id="app">
            <div v-on:click="counter += 1">
                <button v-on:click.stop="counter += 1">Add 1</button>
                <p>按钮已经点击了 {{ counter }} 次.</p>
            </div>
        </div>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.0.2/vue.global.prod.js"></script>
    <script>
        const vm = Vue.createApp({
            data() {
                return {
                    counter: 0
                }
            }
        }).mount('#app');
    </script>
</body>

</html>